package com.tm.d2_api_objects;

import java.util.Objects;

/**
 * 2024/5/23 Objects 等于 非空 不能为空
 */
public class Test {
    public static void main(String[] args) {
        String c1=null;
        String c2="cjj";

        System.out.println(Objects.equals(c1, c2));
        System.out.println(Objects.isNull(c1));
        System.out.println(c1 == null);
        System.out.println(Objects.isNull(c2));
        System.out.println(c2 == null);

        System.out.println(Objects.nonNull(c1));
        System.out.println(Objects.nonNull(c2));

    }
}
